[ Mega Script Archive ] [ Frequently Asked Questions ] [ Random Text ]

How should I format the random text database?

  • Short Answer:

    Any way you like. Just make sure $delimiter matches.

    Long Answer:

    The $delimiter variable in the variable configuration block allows you to tell the random text script how it should split up your database. For instance, by default, it is set to:

          $delimiter = "\n\%\%\n";

    Which, when translated by the double quoted string means a new line, followed by two percent signs and then another new line. That means, basically, just a line with two % signs between each section. This allows you to have multi-line quotes or sections of text and is the same formatting scheme used by the Unix program fortune. You could also change this to:

          $delimiter = "\n";

    if you wanted each quote to be on a line by itself. Just make sure the $delimiter variable matches up to the way you format your database.


[ Mega Script Archive ]